package com.ruoyi.shop.service;

import java.util.List;

import com.ruoyi.shop.domain.ShopPaymentRecord;
import com.ruoyi.shop.domain.ShopUserOrder;
import com.ruoyi.shop.vo.UserOrderVo;

/**
 * 订单Service接口
 * 
 * @author Alan Zhang
 * @date 2021-09-14
 */
public interface IShopUserOrderService 
{
    /**
     * 查询订单
     * 
     * @param id 订单主键
     * @return 订单
     */
    public ShopUserOrder selectShopUserOrderById(Long id);

    /**
     * 查询订单列表
     * 
     * @param shopUserOrder 订单
     * @return 订单集合
     */
    public List<ShopUserOrder> selectShopUserOrderList(ShopUserOrder shopUserOrder);

    /**
     * 新增订单
     * 
     * @param shopUserOrder 订单
     * @return 结果
     */
    public int insertShopUserOrder(ShopUserOrder shopUserOrder);

    /**
     * 修改订单
     * 
     * @param shopUserOrder 订单
     * @return 结果
     */
    public int updateShopUserOrder(ShopUserOrder shopUserOrder);

    /**
     * 批量删除订单
     * 
     * @param ids 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteShopUserOrderByIds(String ids);

    /**
     * 删除订单信息
     * 
     * @param id 订单主键
     * @return 结果
     */
    public int deleteShopUserOrderById(Long id);

    /**
     * 根据订单号查询订单
     * @param orderNo
     * @return
     */
    public ShopUserOrder selectShopUserOrderByOrderNo(String orderNo);

    /**
     * 修改订单备注
     * @param id
     * @param remark
     * @return
     */
    public int updateShopUserOrderRemark(Long id, String remark);

    /**
     * 立即购买 生成订单
     * @param userOrderVo
     * @return
     */
    public ShopUserOrder genBuyOrder(UserOrderVo userOrderVo);

    /**
     * 用户下订单，开始购买
     * @param userOrderVo
     * @return
     */
    public ShopUserOrder genOrder(UserOrderVo userOrderVo);

    /**
     * 支付成功
     * @param paymentRecord
     */
    public void paySuccess(ShopPaymentRecord paymentRecord);

    /**
     * 支付失败
     * @param paymentRecord
     */
    public void payFail(ShopPaymentRecord paymentRecord);
}
